#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H

#include "Singleton.h"
#include "EventHandler.h"
#include "EventPoller.h"
#include "Text.h"

#include <string>
#include <vector>
#include <map>

class ConfigManager : public Uncopyable, public EventHandler
{
	ConfigManager();
	friend class Singleton<ConfigManager>;
public:
	~ConfigManager();

	void DrawInfo();

	void GetMazeGenTime(const float time);
	bool Load(const std::string& filename);
	bool LoadInfoSettings(const std::string& filename);
	int GetSeed() const;
	
	virtual void OnKeyDownEvent(const WPARAM& event) override;
	virtual void OnKeyUpEvent(const WPARAM& event) override;
private:
	bool AppendToSeedFile(const std::string& text);
private:
	int m_seed;
	float m_timeToGenerateMaze;
	Text m_seedText;

	std::map<std::string, int> m_functionKeys; // key: button, value: button int value
	Text m_timeToGenerateMazeText;
};

typedef Singleton<ConfigManager> TheConfigManager;

#endif // CONFIGMANAGER_H